********************************************************************************
********************************************************************************
** Title: Redirecting Law Enforcement Revenues to Local Nonprofits: A Policy Design Proposal
** Author: Dr. Inkyu Kang and PhD Candidate Suyoung Choi
** Last Date Reviewed: January 07, 2025 
** Journal Name: Journal of Public Policy
********************************************************************************
********************************************************************************


********************************************************************************
** Open the Data **
********************************************************************************
des


********************************************************************************
** Randomization Test **
********************************************************************************
ttest age, by(t1)
ttest age, by(t2)

tabulate gender t1, chi2
tabulate gender t2, chi2

tabulate race t1, chi2
tabulate race t2, 

ttest poliorient, by(t1)
ttest poliorient, by(t2)

tabulate region t1, chi2
tabulate region t2, chi2


********************************************************************************
** Main Analysis **
********************************************************************************
reg dv1 i.t1 i.t2 
reg dv2 i.t1 i.t2 
reg dv1 i.t1##i.t2 
reg dv2 i.t1##i.t2 

**Cohen's D
esize twosample dv1, by(t1) all
esize twosample dv1, by(t2) all
esize twosample dv2, by(t1) all
esize twosample dv2, by(t2) all


********************************************************************************
** Appendix Table A1 **
********************************************************************************
ologit dv1 i.t1 i.t2, or
ologit dv2 i.t1 i.t2, or
ologit dv1 i.t1##i.t2, or
ologit dv2 i.t1##i.t2, or

gologit2 dv1 i.t1 i.t2, autofit
gologit2 dv2 i.t1 i.t2, or
gologit2 dv1 i.t1##i.t2, or
gologit2 dv2 i.t1##i.t2, or

brant, detail
oparallel, brant


********************************************************************************
** Appendix Table A2 **
********************************************************************************
anova dv1 i.t1##i.t2
anova dv2 i.t1##i.t2
anova dv1 i.t1 i.t2
anova dv2 i.t1 i.t2


********************************************************************************
** The end of Analysis
********************************************************************************